//
//  UIResponder+SRActionBlock.m
//  UWOApp
//
//  Created by 索晓晓 on 2018/3/26.
//  Copyright © 2018年 SXiao.RR. All rights reserved.
//

char *SRTapAtcionBlovk = "SRTapAtcionBlovk";

#import "UIResponder+SRActionBlock.h"
#import <objc/runtime.h>

#if !__has_feature(objc_arc)
#error This file must be compiled with ARC. Convert your project to ARC or specify the -fobjc-arc flag.
#endif

@implementation UIResponder (SRExpansionActionBlock)

- (TouchBlock)sr_tapActionBlock
{
    id touchblock  = objc_getAssociatedObject(self, SRTapAtcionBlovk);
    
    if (touchblock == nil) {
        touchblock = ^(id object){};
    }
    
    return touchblock;
}
- (void)setSr_tapActionBlock:(TouchBlock)sr_tapActionBlock
{
    objc_setAssociatedObject(self, SRTapAtcionBlovk, sr_tapActionBlock, OBJC_ASSOCIATION_COPY_NONATOMIC);
}






@end
